{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# ruff: noqa: E402\n",
    "import os\n",
    "\n",
    "os.chdir(\"../\")  # Move one level up to import simopt\n",
    "\n",
    "# Import experiment_base module, which contains functions for experimentation.\n",
    "import simopt.experiment_base"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Run 10 macroreplications of ASTRO-DF on the continuous newsvendor problem.\n",
    "myexperiment = simopt.experiment_base.ProblemSolver(\"ASTRODF\", \"CNTNEWS-1\")\n",
    "myexperiment.run(n_macroreps=10)\n",
    "\n",
    "# Post-process the results.\n",
    "myexperiment.post_replicate(n_postreps=200)\n",
    "simopt.experiment_base.post_normalize(\n",
    "    experiments=[myexperiment], n_postreps_init_opt=200\n",
    ")\n",
    "\n",
    "# Record the results and plot the mean progress curve.\n",
    "myexperiment.log_experiment_results()\n",
    "simopt.experiment_base.plot_progress_curves(\n",
    "    experiments=[myexperiment], plot_type=\"mean\", normalize=False\n",
    ")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.9.13 64-bit (microsoft store)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "efc4a4ec95e6d859810f241e65d87235b82d6a4c5c4a60fd317e05e0763f2d90"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
